/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-02-25
 * Time: 22:13
 */
public class Narcissistic {
    public static void main(String[] args) {
        for (int i = 1000; i < 2001; i++) {
            int one = i % 10;
            int ten = (i / 10) % 10;
            int hundred = (i / 100) % 10;
            int thousand = i / 1000;
            if (i == Math.pow(one,4) + Math.pow(ten,4) + Math.pow(hundred,4) + Math.pow(thousand,4)){
                System.out.print(i + "是水仙花数");
            }
        }
    }
}
